#@layout()
#define nav()
	#@teacherNav()
#end
#define main()
#set(key = 0)
#if(projectPage.totalPage != 0)
<form class="form-horizontal" role="form" method="post" action="/teacher/addMark" >
	<div class="panel-group" id="accordion">
		#for(x : projectPage.getList())
		<div class="panel panel-primary">
		<div class="panel-heading">
			<h4 class="panel-title">
				<a data-toggle="collapse" data-parent="#accordion" 
				   href="#collapse#(x.id)">
					#(x.name)&nbsp&nbsp&nbsp&nbsp负责人姓名:#(x.personsResponsibleName)&nbsp&nbsp&nbsp&nbsp报送单位:#(x.organization)
				</a>
				   #for(y : mark)
				   		#if(x.id == y.PID && y.teacher == session.User.name)
				   			#set(key = 1)
				   			#set(mark = y.mark)
				   		#end
				   #end
				   #if(key == 1)
				   			<input class="form-control" id="mark" name="#(x.projectId)mark" type="text" placeholder="分数：#(mark)"   disabled= "true">
				   #else
				   			 &nbsp&nbsp&nbsp&nbsp<input type="checkbox" name="boxes" value="#(x.projectId)"> 
				   			<input class="form-control" id="mark" name="#(x.projectId)mark" type="text" placeholder="请勾选后填写分数" >
							<input type="hidden" name="#(x.projectId)PID" value="#(x.id)" />
				   #end
							
			</h4>
		</div>
		<div id="collapse#(x.id)" class="panel-collapse collapse">
			<div class="panel-body">
				<ul class="list-group">
   					<li class="list-group-item">项目编号:&nbsp&nbsp&nbsp&nbsp#(x.projectId)</li>
   					<li class="list-group-item">申报年份:&nbsp&nbsp&nbsp&nbsp#(x.year)</li>
   					<li class="list-group-item">报送单位:&nbsp&nbsp&nbsp&nbsp#(x.organization)</li>
   					<li class="list-group-item">项目类型:&nbsp&nbsp&nbsp&nbsp#(x.type)</li>
   					<li class="list-group-item">项目级别:&nbsp&nbsp&nbsp&nbsp#(x.levels)</li>
   					<li class="list-group-item">负责人姓名:&nbsp&nbsp&nbsp&nbsp#(x.personsResponsibleName)</li>
   					<li class="list-group-item">负责人学号:&nbsp&nbsp&nbsp&nbsp#(x.personsResponsibleNumber)</li>
   					<li class="list-group-item">项目其他成员:&nbsp&nbsp&nbsp&nbsp#(x.otherPeople)</li>
   					<li class="list-group-item">参与学生人数:&nbsp&nbsp&nbsp&nbsp#(x.number)</li>
   					<li class="list-group-item">指导教师姓名:&nbsp&nbsp&nbsp#(x.teacherName)</li>
   					<li class="list-group-item">指导教师职称:&nbsp&nbsp&nbsp&nbsp#(x.teacherTitle)</li>
   					<li class="list-group-item">项目所属以及学科代码:&nbsp&nbsp&nbsp&nbsp#(x.code)</li>
   					<li class="list-group-item">负责学生联系电话:&nbsp&nbsp&nbsp&nbsp#(x.phone)</li>
   					<li class="list-group-item">第一指导教师联系电话:&nbsp&nbsp&nbsp&nbsp#(x.teacherPhone)</li>
   					<textarea class="form-control" rows="5" id="introduction"  value="#(x.introduction)" readonly="readonly">简介：#(x.introduction)</textarea>
   					<li class="list-group-item">项目状态:&nbsp&nbsp&nbsp&nbsp#(x.status)</li>
   					<li class="list-group-item">项目申报文件:
   					#for(i : file)
   						#if(i.key == x.projectId&&i.value!=null)
   							#for(j = 0; j< i.value.length; j++)
   								<a href="../file/project/#(x.projectId)/application/#(i.value[j])" download><font color="blue">点击下载文件：#(i.value[j])</font></a></br>
   								&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
   							#end
   							#if(i.value.length>1)
   								<a href="../file/project/#(x.projectId)application.zip" download><font color="red">点击下载所有文件</font></a>
   							#end
   						#end
   					#end
   					</li>
   					
				</ul>
				
			</div>
		</div>
		</div>
	#end
	</div>
	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-10">
			<button type="submit" class="btn btn-default">确定评分</button>
		</div>
	</div>
	</form>
	#@paginate(projectPage.pageNumber,projectPage.totalPage,"mark")
#else
<h4 class="panel-title">
				<a data-toggle="collapse" data-parent="#accordion" >
					没有待评分的项目
				</a>
</h4>
#end

#end